package com.yan;

import java.util.HashMap;
import java.util.Set;
import java.util.TreeMap;

/**
 * @author taoge
 * @Date 2024/8/1 19:50
 * @Description
 */
public class Test {
    public static void main(String[] args) {
        HashMap<String, Book> map = new HashMap<>();
        map.put("001" , new Book("001" , "哈利波特" , 32.8 , "清华"));
        map.put("002" , new Book("002" , "或者" , 39.9 , "北京"));
        map.put("003" , new Book("003" , "平凡的世界" , 49.9 , "清华"));
        //map.values().forEach(item-> System.out.println(item));
        TreeMap<String, Book> treeMap = new TreeMap<>();
        treeMap.put("001" , new Book("001" , "哈利波特" , 32.8 , "清华"));
        treeMap.put("002" , new Book("002" , "或者" , 39.9 , "北京"));
        treeMap.put("003" , new Book("003" , "平凡的世界" , 49.9 , "清华"));
        treeMap.values().forEach(item-> System.out.println(item));
    }
}
